<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta charset="utf-8" />
<meta name="keywords" content="" />
<meta name="description" content="" />
<title></title>
<!--<script type="text/javascript" src="assets/js/jquery/1.11.3/jquery.min.js"></script>-->
<script src="assets/js/echart/3.1.10/echarts.common.min.js"></script>
<!--[if lt IE 9]>
<script src="assets/js/html5.js"></script>
<![endif]-->

<link rel="stylesheet" type="text/css" href="assets/css/style.css"/>
</head>
<body>
<div class="main">
	<div class="chart-wrap">
		<div class="chart" id="chartType_od1"></div>
	</div>
	<div class="chart-wrap">
		<div class="chart" id="chartType_od2"></div>
	</div>
</div>
<script type="text/javascript">
	var chartType_od1 = echarts.init(document.getElementById('chartType_od1'));
	var optionod1 = {
        title: {
            text: '2016年1-4月12345转办工单部门分布情况统计',
            top:'top',
            left:'center'
        },
        tooltip: {
        	trigger: 'item'//axis,item
        },
        legend: {
            show:true
            ,top:'bottom'
            ,left:'center'
            ,width:480
            ,data:['城北中队','城中中队','城南中队','城东中队',
,'[城北中队]占比','[城中中队]占比','[城南中队]占比','[城东中队]占比']
        },
        grid:{
        	show :true,
        	bottom:80
        },
        xAxis: [
	        {
	            axisLabel :{
	            	interval :0
	            },
        		splitLine :{
        			show:false
        		},
	            data: ['2016年1月','2016年2月','2016年3月','2016年4月']
	        }
        ],
        yAxis: [
        	{
        		name :'件数'
        	},
        	{
        		name :'百分比',
        		axisLabel :{
        			formatter :'{value}%'
        		},
        		splitLine :{
        			show:false
        		}
//      		,min:'dataMin'
//      		,max:100
        	}
        ],
        series: [
	        {
	        	name:'城北中队',
	        	type:'bar',
	        	data:[74,29,54,68]
	        },
	        {
	        	name:'城中中队',
	        	type:'bar',
	        	data:[44,24,35,27]
	        },
	        {
	        	name:'城南中队',
	        	type:'bar',
	        	data:[31,17,23,41]
	        },
	        {
	        	name:'城东中队',
	        	type:'bar',
	        	data:[12,9,18,25]
	        },
	        {
	       		name:'[城北中队]占比',
	       		type:'line',
	       		symbol:'arrow',
	       		symbolSize :10,
	       		yAxisIndex :1,
	       		itemStyle:{
	       			normal:{
	       				color:'#0dd4ff'
	       			}
	       		},
	       		data:[42.05,36.25,36.24,38.20]
	        },
	        {
	       		name:'[城中中队]占比',
	       		type:'line',
	       		symbol:'rect',
	       		symbolSize :10,
	       		yAxisIndex :1,
	       		itemStyle:{
	       			normal:{
	       				color:'#23ae39'
	       			}
	       		},
	       		data:[25.00,30.00,23.49,15.17]
	        },
	        {
	       		name:'[城南中队]占比',
	       		type:'line',
	       		symbol:'triangle',
	       		symbolSize :10,
	       		yAxisIndex :1,
	       		itemStyle:{
	       			normal:{
	       				color:'#db1fd4'
	       			}
	       		},
	       		data:[17.61,21.25,15.44,23.03]
	        },
	        {
	       		name:'[城东中队]占比',
	       		type:'line',
	       		symbol:'diamond',
	       		symbolSize :10,
	       		yAxisIndex :1,
	       		itemStyle:{
	       			normal:{
	       				color:'#ff9600'
	       			}
	       		},
	       		data:[6.82,11.25,12.08,14.04]
	        }
        ]
    };
    chartType_od1.setOption(optionod1);
    
    var chartType_od2 = echarts.init(document.getElementById('chartType_od2'));
	var optionod2 = {
        title: [{
            text: '2016年1-4月12345转办工单部门分布情况统计(部门占比图)',
            top:50,
            left:'center'
        },
        {
        	text: '2016年1月'
            ,bottom:60
            ,left:150
        },
        {
        	text: '2016年2月'
            ,bottom:60
            ,left:350
        },
        {
        	text: '2016年3月'
            ,bottom:60
            ,left:550
        },
        {
        	text: '2016年4月'
            ,bottom:60
            ,left:750
        }
        ],
        tooltip: {
        	trigger: 'item'//axis,item
        },
        legend: {
            show:true
//          ,top:'bottom'
            ,left:'center'
            ,bottom:20
//          ,orient :'vertical'
//          ,width:800
            ,data:['城北中队','城中中队','城南中队','城东中队']
        },
        grid:{
        	show :false
//      	,bottom:80
        },
        series: [
	        {
	        	name:'2016年1月',
	        	type:'pie',
	        	radius:[0,'45%'],
	        	center:['20%','50%'],
        		legendHoverLink :false,
	        	label: {
	                normal: {
	                    show: true,
	                    position :'inside',
	                    formatter :'{d}%'
	                }
	            },
	            lableLine: {
	                normal: {
	                    show: false
	                }
	            },
	        	data:[
		        	{value:74,itemStyle:sindex2itemcolor(0),name:'城北中队'},
		        	{value:44,itemStyle:sindex2itemcolor(1),name:'城中中队'},
		        	{value:31,itemStyle:sindex2itemcolor(2),name:'城南中队'},
		        	{value:12,itemStyle:sindex2itemcolor(3),name:'城东中队'}
	        	]
	        },
	        {
	        	name:'2016年2月',
	        	type:'pie',
	        	radius:[0,'45%'],
	        	center:['40%','50%'],
        		legendHoverLink :false,
	        	label: {
	                normal: {
	                    show: true,
	                    position :'inside',
	                    formatter :'{d}%'
	                }
	            },
	            lableLine: {
	                normal: {
	                    show: false
	                }
	            },
	        	data:[
					{value:29,itemStyle:sindex2itemcolor(0),name:'城北中队'},
		        	{value:24,itemStyle:sindex2itemcolor(1),name:'城中中队'},
		        	{value:17,itemStyle:sindex2itemcolor(2),name:'城南中队'},
		        	{value:9,itemStyle:sindex2itemcolor(3),name:'城东中队'}
	        	]
	        },
	        {
	        	name:'2016年3月',
	        	type:'pie',
	        	radius:[0,'45%'],
	        	center:['60%','50%'],
        		legendHoverLink :false,
	        	label: {
	                normal: {
	                    show: true,
	                    position :'inside',
	                    formatter :'{d}%'
	                }
	            },
	            lableLine: {
	                normal: {
	                    show: false
	                }
	            },
	        	data:[
					{value:54,itemStyle:sindex2itemcolor(0),name:'城北中队'},
		        	{value:35,itemStyle:sindex2itemcolor(1),name:'城中中队'},
		        	{value:23,itemStyle:sindex2itemcolor(2),name:'城南中队'},
		        	{value:18,itemStyle:sindex2itemcolor(3),name:'城东中队'}
	        	]
	        },
	        {
	        	name:'2016年4月',
	        	type:'pie',
	        	radius:[0,'45%'],
	        	center:['80%','50%'],
        		legendHoverLink :false,
	        	label: {
	                normal: {
	                    show: true,
	                    position :'inside',
	                    formatter :'{d}%'
	                }
	            },
	            lableLine: {
	                normal: {
	                    show: false
	                }
	            },
	        	data:[
					{value:68,itemStyle:sindex2itemcolor(0),name:'城北中队'},
		        	{value:27,itemStyle:sindex2itemcolor(1),name:'城中中队'},
		        	{value:41,itemStyle:sindex2itemcolor(2),name:'城南中队'},
		        	{value:25,itemStyle:sindex2itemcolor(3),name:'城东中队'}
	        	]
	        }
        ]
    };
    chartType_od2.setOption(optionod2);


/*---common-functions----*/
function sindex2itemcolor(sindex){
	var colors = ['#c23531','#2f4554', '#61a0a8', '#d48265', '#91c7ae'];
	
	return {
    	normal:{
    		color : colors[sindex]
    	}
    }
}
</script>
</body>
</html>
